#include "Stack.h"

template<typename T>
void Stack<T>::push(const T& item) {
    elems.push_back(item);
}
template<typename T>
T Stack<T>::pop() {
    assert(!elems.empty());
    T item = elems.back();
    elems.pop_back();
    return item;
}
template<typename T>
const T& Stack<T>::top() const {
    assert(!elems.empty());
    return elems.back();
}
template<typename T>
bool Stack<T>::empty() const {
    return elems.empty();
}